Show error message when running query on empty list#1860
Merged
norascheuch merged 3 commits intomainfrom Dec 13, 2022
Merged
Conversation
Contributor
robertbrignull
left a comment
There was a problem hiding this comment.
Random drive-by typo fix, but I'll let the rest of the people working on this feature review the rest.
…ies/repository-selection.test.ts Co-authored-by: Robert <robertbrignull@github.com>
charisk
reviewed
Dec 13, 2022
Contributor
charisk
left a comment
There was a problem hiding this comment.
Speedy ⚡
Generally looking good, just some small comments.
| repositories: selectedDbItem.repos.map((repo) => repo.repoFullName), | ||
| }; | ||
| if (selectedDbItem.repos.length === 0) { | ||
| throw new Error( |
Contributor
There was a problem hiding this comment.
I think it's better to do showAndLogErrorMessage rather than throwing an exception. It has the same outcome from a user's perspective but it won't be considered as an unhandled error from our app's perspective.
Contributor
Author
There was a problem hiding this comment.
Good point, I changed the other errors in that switch as well!
charisk
approved these changes
Dec 13, 2022
cfb6cf1 to
0f1881d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When creating a new DB List in the panel it will be empty at first. We are now showing an error if one tries to run a query on an empty remote DB list.
Checklist
ready-for-doc-reviewlabel there.